905d84
@@ -248,13 +248,14 @@
protected void spillBigTableRow(MapJoinTableContainer hybridHtContainer, Object
     super.spillBigTableRow(hybridHtContainer, actualRow);
   }
 
+  // Only used by spillBigTableRow?
   // Code borrowed from VectorReduceSinkOperator
   private Object[] getRowObject(VectorizedRowBatch vrb, int rowIndex) throws HiveException {
     int batchIndex = rowIndex;
     if (vrb.selectedInUse) {
       batchIndex = vrb.selected[rowIndex];
     }
-    for (int i = 0; i < vrb.projectionSize; i++) {
+    for (int i = 0; i < singleRow.length; i++) {
       ColumnVector vectorColumn = vrb.cols[vrb.projectedColumns[i]];
       if (vectorColumn != null) {
         singleRow[i] = rowWriters[i].writeValue(vectorColumn, batchIndex);
